//
//  LYSetTableViewCell.m
//  IPhoneX适配
//
//  Created by 训网高 on 2018/5/2.
//  Copyright © 2018年 训网高. All rights reserved.
//

#import "LYSetTableViewCell.h"

@implementation LYSetTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        if (!_mainImageView) {
            _mainImageView = [[UIImageView alloc] initWithFrame:CGRectMake(20, 15, 20, 20)];
            [self addSubview:_mainImageView];
        }
        if (!_titleLabel) {
            _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_mainImageView.frame)+20, 15, 120, 20)];
            _titleLabel.textAlignment = NSTextAlignmentLeft;
            _titleLabel.font = [UIFont systemFontOfSize:15.0];
            [self addSubview:_titleLabel];
            
        }
        if (!_subTitleLabel) {
            _subTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-140, 15, 130, 20)];
            _subTitleLabel.font = [UIFont systemFontOfSize:13.0];
            _subTitleLabel.textAlignment = NSTextAlignmentRight;
            _subTitleLabel.textColor = UIColorFromRGB(0xa0a0a0);
            [self addSubview:_subTitleLabel];
        }
    }
    return self;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
